|
Quaqua 3.9.5 2007-10-21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.plaf.ComponentUI
javax.swing.plaf.TreeUI
javax.swing.plaf.basic.BasicTreeUI
ch.randelshofer.quaqua.QuaquaTreeUI
public class QuaquaTreeUI
QuaquaTreeUI. XXX - Without copying a substantial amount of code from BasicTreeUI, we can't implement the proper selection behavior for a JTree.
| Nested Class Summary | |
|---|---|
class |
QuaquaTreeUI.FocusHandler
This inner class is marked "public" due to a compiler bug. |
class |
QuaquaTreeUI.MouseHandler
TreeMouseListener is responsible for updating the selection based on mouse events. |
| Nested classes/interfaces inherited from class javax.swing.plaf.basic.BasicTreeUI |
|---|
javax.swing.plaf.basic.BasicTreeUI.CellEditorHandler, javax.swing.plaf.basic.BasicTreeUI.ComponentHandler, javax.swing.plaf.basic.BasicTreeUI.KeyHandler, javax.swing.plaf.basic.BasicTreeUI.MouseInputHandler, javax.swing.plaf.basic.BasicTreeUI.NodeDimensionsHandler, javax.swing.plaf.basic.BasicTreeUI.PropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.SelectionModelPropertyChangeHandler, javax.swing.plaf.basic.BasicTreeUI.TreeCancelEditingAction, javax.swing.plaf.basic.BasicTreeUI.TreeExpansionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeHomeAction, javax.swing.plaf.basic.BasicTreeUI.TreeIncrementAction, javax.swing.plaf.basic.BasicTreeUI.TreeModelHandler, javax.swing.plaf.basic.BasicTreeUI.TreePageAction, javax.swing.plaf.basic.BasicTreeUI.TreeSelectionHandler, javax.swing.plaf.basic.BasicTreeUI.TreeToggleAction, javax.swing.plaf.basic.BasicTreeUI.TreeTraverseAction |
| Field Summary |
|---|
| Fields inherited from class javax.swing.plaf.basic.BasicTreeUI |
|---|
cellEditor, collapsedIcon, createdCellEditor, createdRenderer, currentCellRenderer, depthOffset, drawingCache, editingComponent, editingPath, editingRow, editorHasDifferentSize, expandedIcon, largeModel, lastSelectedRow, leftChildIndent, nodeDimensions, preferredMinSize, preferredSize, rendererPane, rightChildIndent, stopEditingInCompleteEditing, totalChildIndent, tree, treeModel, treeSelectionModel, treeState, validCachedPreferredSize |
| Constructor Summary | |
|---|---|
QuaquaTreeUI()
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected javax.swing.tree.TreeCellEditor |
createDefaultCellEditor()
Creates a default cell editor. |
protected javax.swing.tree.TreeCellRenderer |
createDefaultCellRenderer()
Returns the default cell renderer that is used to do the stamping of each node. |
protected java.awt.event.FocusListener |
createFocusListener()
Creates the focus listener for handling keyboard navigation in the JTable. |
protected java.awt.event.MouseListener |
createMouseListener()
|
static javax.swing.plaf.ComponentUI |
createUI(javax.swing.JComponent c)
|
protected void |
installDefaults()
|
protected boolean |
isMultiSelectEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event on the node should select from the anchor point. |
protected boolean |
isToggleEvent(java.awt.event.MouseEvent event)
|
protected boolean |
isToggleSelectionEvent(java.awt.event.MouseEvent event)
Returning true signifies a mouse event on the node should toggle the selection of only the row under mouse. |
void |
paint(java.awt.Graphics gr,
javax.swing.JComponent c)
|
protected void |
paintHorizontalLine(java.awt.Graphics g,
javax.swing.JComponent c,
int y,
int left,
int right)
Paints a horizontal line. |
protected void |
paintHorizontalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
java.awt.Rectangle bounds,
javax.swing.tree.TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
Paints the horizontal part of the leg. |
protected void |
paintRow(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
java.awt.Rectangle bounds,
javax.swing.tree.TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf,
boolean isEnabled,
boolean isFocused)
Paints the renderer part of a row. |
protected void |
paintVerticalLine(java.awt.Graphics g,
javax.swing.JComponent c,
int x,
int top,
int bottom)
Paints a vertical line. |
protected void |
paintVerticalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
javax.swing.tree.TreePath path)
Paints the vertical part of the leg. |
protected void |
selectPathForEvent(javax.swing.tree.TreePath path,
java.awt.event.MouseEvent event)
Messaged to update the selection based on a MouseEvent over a particular row. |
| Methods inherited from class javax.swing.plaf.basic.BasicTreeUI |
|---|
cancelEditing, checkForClickInExpandControl, completeEditing, completeEditing, completeUIInstall, completeUIUninstall, configureLayoutCache, createCellEditorListener, createCellRendererPane, createComponentListener, createKeyListener, createLayoutCache, createNodeDimensions, createPropertyChangeListener, createSelectionModelPropertyChangeListener, createTreeExpansionListener, createTreeModelListener, createTreeSelectionListener, drawCentered, drawDashedHorizontalLine, drawDashedVerticalLine, ensureRowsAreVisible, getCellEditor, getCellRenderer, getClosestPathForLocation, getCollapsedIcon, getEditingPath, getExpandedIcon, getHashColor, getHorizontalLegBuffer, getLastChildPath, getLeftChildIndent, getMaximumSize, getMinimumSize, getModel, getPathBounds, getPathForRow, getPreferredMinSize, getPreferredSize, getPreferredSize, getRightChildIndent, getRowCount, getRowForPath, getRowHeight, getRowX, getSelectionModel, getShowsRootHandles, getVerticalLegBuffer, handleExpandControlClick, installComponents, installKeyboardActions, installListeners, installUI, isEditable, isEditing, isLargeModel, isLeaf, isLocationInExpandControl, isRootVisible, paintExpandControl, paintRow, pathWasCollapsed, pathWasExpanded, prepareForUIInstall, prepareForUIUninstall, setCellEditor, setCellRenderer, setCollapsedIcon, setEditable, setExpandedIcon, setHashColor, setLargeModel, setLeftChildIndent, setModel, setPreferredMinSize, setRightChildIndent, setRootVisible, setRowHeight, setSelectionModel, setShowsRootHandles, shouldPaintExpandControl, startEditing, startEditingAtPath, stopEditing, toggleExpandState, uninstallComponents, uninstallDefaults, uninstallKeyboardActions, uninstallListeners, uninstallUI, updateCachedPreferredSize, updateCellEditor, updateDepthOffset, updateExpandedDescendants, updateLayoutCacheExpandedNodes, updateRenderer, updateSize |
| Methods inherited from class javax.swing.plaf.ComponentUI |
|---|
contains, getAccessibleChild, getAccessibleChildrenCount, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public QuaquaTreeUI()
| Method Detail |
|---|
public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
protected void installDefaults()
installDefaults in class javax.swing.plaf.basic.BasicTreeUIprotected javax.swing.tree.TreeCellEditor createDefaultCellEditor()
createDefaultCellEditor in class javax.swing.plaf.basic.BasicTreeUIprotected javax.swing.tree.TreeCellRenderer createDefaultCellRenderer()
createDefaultCellRenderer in class javax.swing.plaf.basic.BasicTreeUIprotected boolean isToggleSelectionEvent(java.awt.event.MouseEvent event)
isToggleSelectionEvent in class javax.swing.plaf.basic.BasicTreeUIprotected boolean isToggleEvent(java.awt.event.MouseEvent event)
isToggleEvent in class javax.swing.plaf.basic.BasicTreeUIprotected boolean isMultiSelectEvent(java.awt.event.MouseEvent event)
isMultiSelectEvent in class javax.swing.plaf.basic.BasicTreeUI
protected void selectPathForEvent(javax.swing.tree.TreePath path,
java.awt.event.MouseEvent event)
selectPathForEvent in class javax.swing.plaf.basic.BasicTreeUIprotected java.awt.event.FocusListener createFocusListener()
createFocusListener in class javax.swing.plaf.basic.BasicTreeUIprotected java.awt.event.MouseListener createMouseListener()
createMouseListener in class javax.swing.plaf.basic.BasicTreeUI
public void paint(java.awt.Graphics gr,
javax.swing.JComponent c)
paint in class javax.swing.plaf.basic.BasicTreeUI
protected void paintVerticalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
javax.swing.tree.TreePath path)
clipBounds, insets.
paintVerticalPartOfLeg in class javax.swing.plaf.basic.BasicTreeUI
protected void paintHorizontalPartOfLeg(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
java.awt.Rectangle bounds,
javax.swing.tree.TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf)
clipBounds, or insets.
NOTE: parentRow can be -1 if the root is not visible.
paintHorizontalPartOfLeg in class javax.swing.plaf.basic.BasicTreeUI
protected void paintVerticalLine(java.awt.Graphics g,
javax.swing.JComponent c,
int x,
int top,
int bottom)
paintVerticalLine in class javax.swing.plaf.basic.BasicTreeUI
protected void paintHorizontalLine(java.awt.Graphics g,
javax.swing.JComponent c,
int y,
int left,
int right)
paintHorizontalLine in class javax.swing.plaf.basic.BasicTreeUI
protected void paintRow(java.awt.Graphics g,
java.awt.Rectangle clipBounds,
java.awt.Insets insets,
java.awt.Rectangle bounds,
javax.swing.tree.TreePath path,
int row,
boolean isExpanded,
boolean hasBeenExpanded,
boolean isLeaf,
boolean isEnabled,
boolean isFocused)
clipBounds, or insets.
|
Copyright 2003-2007 (c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||